<html>
<head>
<link rel="stylesheet" href="/static/diary.css" type="text/css">
</head>

<body>
<h1>Task List</h1>

{% if errors %}
<ul>
{% for error in errors %}
<li>{{error}}</li>
{% endfor %}
</ul>
{% endif %}

<form action="/task/" method="post">
{% csrf_token %}
<table border='0' cellspacing='0' cellpadding='0'>
    <tr>
        <th>&nbsp;</th>
        <th>任务名称</th>
        <th>项目</th>
        <th>指派人</th>
        <th>计划开始时间</th>
        <th>计划结束时间</th>
        <th>实际开始时间</th>
        <th>实际结束时间</th>
        <th>任务简介</th>
    </tr>
{% for tk in tk_list %}
<tr>
    <td><input type="checkbox" name="tk_del" value="{{tk.name}}"></input></td>
    <td>{{tk.name}}</td>
    <td>{{tk.project}}</td>
    <td>{{tk.user}}</td>
    <td>{{tk.plan_start_date}}</td>
    <td>{{tk.plan_finish_date}}</td>
    <td>{{tk.actual_start_date}}</td>
    <td>{{tk.actual_finish_date}}</td>
    <td>{{tk.task_info}}</td>
</tr>
{% endfor %}
</table>
<input type="submit" name="op" value="del"></input>
<br/><br/>

<table border="0" cellspacing="0" cellpading="0">
<tr><th>任务名称</th><td><input type="text" name="tk_name"></td></tr>
<tr><th>指派人</th>
    <td><select name="tk_user">
    {% for user in ey_list %}
    <option value="{{user}}">{{user}}</option>
    {% endfor %}
    </select></td></tr>
<tr><th>项目</th>
    <td><select name="tk_project">
    {% for pj in pj_list %}
    <option value="{{pj}}">{{pj}}</option>
    {% endfor %}
    </select></td></tr>
<tr><th>计划开始时间</th><td><input type="text" name="tk_plan_start_date"></td></tr>
<tr><th>计划结束时间</th><td><input type="text" name="tk_plan_finish_date"></td></tr>
<tr><th>实际开始时间</th><td><input type="text" name="tk_actual_start_date"></td></tr>
<tr><th>实际结束时间</th><td><input type="text" name="tk_actual_finish_date"></td></tr>
<tr><th>任务简介</th><td><input type="text" name="tk_task_info"></td></tr>
</table>
<input type="submit" name="op" value="add"></input>
</form>

</body>
</html>
